package com.jack.helloworld.activity;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;

import com.jack.helloworld.R;
import com.jack.helloworld.util.ToastUtil;
import com.jack.helloworld.view.CountDownProgressView;

public class SkipButtonActivity extends AppCompatActivity {

    private CountDownProgressView mSkip;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_skip_button);

        mSkip = (CountDownProgressView) findViewById(R.id.cdpv_skip);
        mSkip.setProgressListener(new CountDownProgressView.OnProgressListener() {
            @Override
            public void onProgress(int progress) {
                //Logger.d("onProgress#progress: " + progress);
            }
        });

    }

    public void doClick(View view) {
        switch (view.getId()) {
            case R.id.btn_start:
                mSkip.start();
                break;
            case R.id.btn_stop:
                mSkip.stop();
                break;
            case R.id.btn_restart:
                mSkip.reStart();
                break;
            case R.id.cdpv_skip:
                ToastUtil.showShortToast(this, "click skip");
                break;
        }
    }
}
